package com.wehotel.common.exception;

/**
 * 自定义业务异常类
 *
 * @author Bisharp
 */
public class BizException extends RuntimeException {
    private static final long serialVersionUID = 1L;

    private int status;
    private String redirectUri;

    public BizException() {
        super();
    }

    public BizException(String message) {
        super(message);
        this.status = -1;
    }

    public BizException(int code, String message) {
        super(message);
        this.status = code;
    }
    public BizException(int code, String message, String redirectUri) {
        super(message);
        this.status = code;
        this.redirectUri = redirectUri;
    }

    /**
     * 避免获取方法栈快照信息
     */
    @Override
    public Throwable fillInStackTrace() {
        return this;
    }

    public int getStatus() {
        return this.status;
    }

    public String getRedirectUri() {
        return redirectUri;
    }
}

